﻿using System;
using UnityEngine;

namespace ProjectDanmaku.Audio
{
    [RequireComponent(typeof(AudioSource))]
    public class SoundInstance : MonoBehaviour
    {
        private AudioSource _audio;
        
        private void Start()
        {
            _audio = GetComponent<AudioSource>();
            
            Destroy(gameObject, _audio.clip.length + 0.5f);
        }
    }
}